//
//  ZDOrderCenterController.m
//  ZDPension
//
//  Created by 刘甲奇 on 2017/6/19.
//  Copyright © 2017年 maker. All rights reserved.
//

#import "ZDOrderCenterController.h"
#import "ZDWaitPayController.h"
#import "ZDWaitConsumeController.h"
#import "ZDWaitCommitController.h"
#import "ZDFinishedController.h"

@interface ZDOrderCenterController ()

@end

@implementation ZDOrderCenterController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的订单";
    
    //分割线
    UIView *lineView = [[UIView alloc] init];
    [self.menuView addSubview:lineView];
    lineView.frame = CGRectMake(0, 40, LEScreenWidth, 1);
    lineView.backgroundColor = LEHaxColor(0xe8e8e8);
    
}
#pragma mark- WMPageControllerDataSource
- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController
{
    return 4;
}

- (__kindof UIViewController *)pageController:(WMPageController *)pageController viewControllerAtIndex:(NSInteger)index
{
    if (index == 0) {
        
        return [[ZDWaitPayController alloc] init];
    }else if(index == 1){
        
        return [[ZDWaitConsumeController alloc] init];
    }else if(index == 2){
        
        return [[ZDWaitCommitController alloc] init];
    }else
    {
        return [[ZDFinishedController alloc] init];
    }
    
}

- (NSString *)pageController:(WMPageController *)pageController titleAtIndex:(NSInteger)index
{
    
    if (index == 0) {
        return @"未支付";
    }else if (index == 1){
        return @"待消费";
    }else if (index == 2){
        return @"待评价";
    }else{
        return @"已完成";
    }
    
}



@end
